<template>
  <div style="margin-bottom:66px" class="">
    <!-- <top :pageTitle="pageTitle"></top> -->
    <fail-pop-up v-show="isPop"></fail-pop-up>
    <service-code></service-code>
    <step-progress :afterSaleProgress="afterSaleProgress"></step-progress>
    <!-- <bottom style="position:fixed;bottom:0px"></bottom> -->
    <div  style="height:50px;background:#ffffff;width:100vw;padding:0 4vw;position:fixed;bottom:0px">
        <mu-button color="" :ripple=false :flat=true style="width:80px;height:30px;border-radius: 100px;border:1px solid #333333;color:#333333;float:right;margin:10px 0 0 10px" v-if="afterSaleProgress.step2.isAgree" @click="withdraw1()">取消申请</mu-button>
        <mu-button color="" :ripple=false :flat=true style="width:80px;height:30px;border-radius: 100px;border:1px solid #333333;color:#333333;float:right;margin:10px 0 0 10px" v-if="!afterSaleProgress.step2.isAgree&&!afterSaleProgress.step3">再次申请</mu-button>
        <router-link to="/afterSaleEvaluation"><mu-button color="" :ripple=false :flat=true style="width:80px;height:30px;border-radius: 100px;border:1px solid #333333;color:#333333;float:right;margin:10px 0 0 10px" v-if="afterSaleProgress.step3">售后评价</mu-button></router-link>
        <mu-button color="" :ripple=false :flat=true style="width:80px;height:30px;border-radius: 100px;border:1px solid #333333;color:#333333;float:right;margin:10px 0 0 10px" v-if="afterSaleProgress.step3">关闭交易</mu-button>
        <mu-button color="" :ripple=false :flat=true style="width:80px;height:30px;border-radius: 100px;border:1px solid #333333;color:#333333;float:right;margin-top:10px" v-if="afterSaleProgress.step1">联系客服</mu-button>
    </div>
  </div>
</template>
<script>
import axios from 'axios';
import ServiceCode from '@/components/afterSaleStep/serviceCode.vue';
import StepProgress from '@/components/afterSaleStep/stepProgress.vue';
import Bottom from '@/components/afterSaleStep/bottom.vue';
import FailPopUp from '@/components/common/failpopUp.vue';
import Top from '@/components/common/top.vue';
// import CustomerService from '@/components/common/customService.vue';
export default {
    name:'afterSaleStep',
    components:{
        'ServiceCode':ServiceCode,
        'StepProgress':StepProgress,
        'Bottom':Bottom,
        'FailPopUp':FailPopUp,
        'Top':Top,
    },
    data () {
        return {
            afterSaleProgress:{
                type:1,
                step1:{
                    time:'2018/09/22 09:37:56',
                },
                step2:{
                    isAgree:true,
                    time:'2018/09/22 09:37:56',
                },
                step3:{
                    time:'2018/09/22 09:37:56',
                    Refunds:500,
                    realRefund:500
                }
            },
            isPop:false,
            pageTitle:"售后进度",
            code:'111111111111111'
        }
    },
    computed:{
    },
    methods:{
        withdraw1:function(){
            var that=this;
            this.$http.post('/api/api/user/cancelRefund', {
                time:'1532658064',
                device_id:'1532658064',
                version:'1.0.1',
                platform:'android',
                token:'69f7e6e2e95aaef9c58efb1fefdbba4b',
                refund_no:that.code,
            })
            .then(function (response) {
                console.log('success:',response);
            })
            .catch(function (response) {
                console.log('error:',response);
            })
        }  
    },
    created() {
       
    }
}
</script>
<style lang='scss'>
    
</style>